package com.cdu.guoxinan.www.smartcom.mapper;

import com.cdu.guoxinan.www.smartcom.domian.dto.ResidentQueryDTO;
import com.cdu.guoxinan.www.smartcom.domian.pojo.Resident;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ResidentMapper {
    List<Resident> queryPage(ResidentQueryDTO residentQueryDTO);

    int add(Resident resident);

    int update(Resident resident);

    int delete(Integer id);
    /**
     * 根据用户ID查询居民信息
     */
    Resident selectByUserId(Long userId);


    Resident findByUsername(String name);

    int setUserId(@Param("userId") Integer userId, @Param("residentId") Integer residentId);

    Resident findByUserId( @Param("userId") Integer userId);
}
